-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harden system calls to git #699
base: master
Are you sure you want to change the base?
Conversation
|
||
let git = ['git', '--git-dir='.gitdir, '--work-tree='.workdir] | ||
|
||
return join(map(copy(git + args), 'vundle#installer#shellesc')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... no idea really :-D
I copie this from elsewhere, just to be sure. I do not know how vim handles this, but it was used elsewhere, so better safe than sorry.
@klaernie, would you mind to test this in a vcsh environment ? Your feedback would help a lot. |
This PR seems like a great idea IMHO 👍 . Yeah lots of testing and some of it is probably over my head but i will try to also help out testing and reviewing. |
@layus: I'll try it out after work. |
@@ -357,12 +356,37 @@ endf | |||
" return -- A 15 character log sha for the current HEAD | |||
" --------------------------------------------------------------------------- | |||
func! s:get_current_sha(bundle) | |||
let cmd = 'cd '.vundle#installer#shellesc(a:bundle.path()).' && git rev-parse HEAD' | |||
let cmd = vundle#installer#shellesc_cd(cmd) | |||
let cmd = s:make_sync_command(a:bundle, ['rev-parse', 'HEAD']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? It looks like the function expects totaly different args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... No, of course no. This must be an autocomplete typo.
Le 1 mars 2016 07:18:40 UTC+01:00, Lucas Hoffmann [email protected] a écrit :
@@ -357,12 +356,37 @@ endf
" return -- A 15 character log sha for the current HEAD"
func! s:get_current_sha(bundle)
- let cmd = 'cd '.vundle#installer#shellesc(a:bundle.path()).' &&
git rev-parse HEAD'- let cmd = vundle#installer#shellesc_cd(cmd)
- let cmd = s:make_sync_command(a:bundle, ['rev-parse', 'HEAD'])
Does this work? It looks like the function expects totaly different
args.
Reply to this email directly or view it on GitHub:
https://github.com/VundleVim/Vundle.vim/pull/699/files#r54526969
I have now tested my code and fixed many syntax issues. See 4629700 for details. |
@klaernie, Did it work for you ? |
@layus worked perfectly. Although I had to try three times until I noticed that my temporary change to my vimrc needed to uncomment the original bootstrap git clone line.. |
I also tested deletion and update. even the call to submodules seems to work fine. |
@layus I am not really sure. I would like to test this out myself as well. If you have any sort of test plan else I'll just go through ad hoc as best as I can 😊 I have mostly just been merging the low hanging fruit but I do plan on looking at these more impactful/non-trivial PRs as well I don't know when exactly I can get to more PRs right know but this project is back on my radar so I am trying to help out more... cheers. |
Yep, but at the same time this is quite a trivial change. Use git arguments instead of cd'ing into a repo. |
@layus Yeah sorry, actually for a code change you are correct this could definitely be described as trivial. I am just trying to be extra careful (maybe overly so) about merging things in because I am not extremely familiar with the project code and/or impact. Also I would not want to break Vundle since it is still used by a lot of vim users. |
@ryanoasis, what do you mean by 'still used' ? Is there some acknowledged successor ? I have been an happy user ever since I discovered vim plugins :-). Should I move to something else ? |
Hey I promise I haven't forgotten about these PRs and I think so far I will target these in a milestone I created. I have tried to reach out to @gmarik to see about workflow, etc. I plan on continuing on even without hearing back and just hoping I do things correctly 😅 |
Nice ! Thanks ! I promise I will test the new release before it is published :-) |
Harden system calls to git Fixes from PR #684 (cameris/master) re-applied to new function 's:make_git_command' Conflicts: autoload/vundle/installer.vim autoload/vundle/scripts.vim
Finally got around to getting these into branch/release 0.10.3 Have only cursory tested Side note, not sure when it happened (seems to even happen on master) but during my testing |
This pull-request ensures that git uses the right directory.
In particular, it fixes #693 by overriding annoying environment variables.
and I have not tested it,so this PR needs a careful reviewand probably many edits.